//
//  Common.swift
//  知乎日报Demo
//
//  Created by Ann on 2017/10/14.
//  Copyright © 2017年 Ann. All rights reserved.
//

import UIKit

let ScreenWidth:CGFloat = UIScreen.main.bounds.width
let ScreenHeight:CGFloat = UIScreen.main.bounds.height

func stringToInt(str:String)->(Int){
    
    let string = str
    var int: Int?
    
    
    if let doubleValue = Int(string) {
        int = Int(doubleValue)
        
        
    }
    if int == nil
    {
        return 0
    }
    return int!
}
    
